﻿using System;
using SharpTrainer.DP.FactoryMethod.Generic;
using Zeus.Thunder.Core;

namespace SharpTrainer.DesignPattern
{
    class FactoryMethodGenTest : ITestCase
    {
        public void Run()
        {
            Creator[] creators = new Creator[2]; 
            creators[0] = new ConcreteCreatorA(); 
            creators[1] = new ConcreteCreatorB(); 
            
            // Iterate over creators and create products 
            foreach (Creator creator in creators) 
            {
                SharpTrainer.DP.FactoryMethod.Generic.Product product = creator.FactoryMethod(); 
                Console.WriteLine("Created {0}", product.GetType().Name); 
            }
        }
    }
}

